import Vue from 'vue'

const axios = Vue.$axios

export const GetListIcon = (param) => {
    return axios({
        url: '/icons',
        method: 'get',
        params: param
    })
}

export const GetOneIcon = (id) => {
    return axios({
        url: '/icons/' + id,
        method: 'get'
    })
}

export const CreateOneIcon = (data) => {
    return axios({
        url: '/icons',
        method: 'post',
        data: data
    })
}

export const UpdateOneIcon = (data) => {
    return axios({
        url: '/icons' + '/' + data.id,
        method: 'put',
        data: data
    })
}

export const PatchOneIcon = (data) => {
    return axios({
        url: '/icons' + "/" + data.id,
        method: 'patch',
        data: data
    })
}

export const RemoveOneIcon = (id) => {
    return axios({
        url: '/icons/' + id,
        method: 'delete',
    })
}